home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / disk & file tools / dirmenu / dirmenu.guide (.txt) < prev    next >
Amigaguide Document  |  1996-04-07  |  28KB  |  502 lines

  1. @database 07a22bf8-0
  2. @master Emi:CLang/Progs/DirMenu/DirMenu.guide
  3. @$VER: 0.9b
  4. @author "Jure Vrhovnik"
  5. @(c) "1994"
  6. @wordwrap
  7. @font topaz.font 8
  8. @remark Created with Heddley v1.1 (c) Edd Dumbill 1994
  9. @node "Main" "Dir Menu v0.9beta"
  10.                             @{u}Dir Menu v0.9b@{uu}
  11.                          @{fg shine}
  12.  Jure Vrhovnik, 1994@{fg text}
  13.                    @{i}This is a PUBLIC DOMAIN program.@{ui}
  14. You  can  use  and  redistribute  it  as  long as you don't use it for
  15. commercial  purpose.   Please redistribute this program with all files
  16. originaly included in the archive.
  17. This  is a test (beta) version.  If you find any bugs, if you want any
  18. features  not  yet implented, if you have any suggestions or comments,
  19. please report any thing to the author.
  20.  Click here for @{" author's address " link "Address" 0}. 
  21.  ------------------------------------------------
  22.     @{" What is this?           " link "WhatIsThis" 0}        
  23.     @{" How to INSTALL it?      " link "Instalation" 0}    
  24.     @{" How do I start it?      " link "Start" 0}     
  25.     @{" How do I use it?        " link "Usage" 0}      
  26.     @{" Icon tooltypes          " link "ToolTypes" 0}        
  27.     @{" The config file         " link "Config" 0}        
  28.     @{" Defining new file types " link "Whatis Library" 0} 
  29.     @{" Future versions         " link "Future" 0}        
  30.     @{" Thanks go to            " link "Thanks" 0}        
  31. @endnode
  32. @node "WhatIsThis" "About Dir Menu"
  33.    Dir  Menu  is  a  pop  up  based file selector.  You simply press a
  34. hotkey  and  a  menu  will  pop up on current screen, showing all disk
  35. volumes  you have.  Then select a volume, and it's root directory will
  36. appear.   Then  select  any  file on your directory, and Dir Menu will
  37. execute  selected  file according to its type @{i}(if it's an IFF file
  38. it will get shown on a screen)@{ui}.
  39.    @{fg shine}But there is more! If you're still interested READ ON!@{fg text}
  40. You can configure what Dir Menu should do on any type of file you will
  41. select.  You can also configure your favorite directories and files to
  42. appear on the first display (when you press a hotkey).
  43.    @{fg shine}But that's still not it!  :-)@{fg text}
  44. Dir  Menu  will  recognize  almost every known type of files.  It uses
  45. WhatIs  library,  and  that  means  if  there  is any type of file not
  46. already  configured  you  can  configure a new type, and Dir Menu will
  47. remember it for ever!
  48. @{b}AGAIN:@{ub}@{fg shine}
  49.   With  Dir  Menu  you  can  instantly  and  quickly  browse  throught
  50. directory  trees  on your disk drives, easily take a look at a picture
  51. anywhere  on  your  disk, read any text without worrying how to load a
  52. text  shower  first,  look into a lha archive by simply selecting that
  53. archive file etc.@{fg text}
  54. @endnode
  55. @node "Start" "How to run Dir Menu"
  56.   When  you first start the program a display will pop up on a screen.
  57. @{b}If  you  don't  want Dir Menu to pop up on
  58. first execution you can
  59. disable this option in the icon tool types.@{ub}
  60.   If  you've  started  the  program  you  can  now browse through your
  61. directories  by  clicking  on their names.  When you select a file Dir
  62. Menu  will  try  to  find its type, and will execute a command that is
  63. defined for that type in DirMenu.cfg configuration file (if there is a
  64. definition).   If  a  file's  type  is  not  known, or if no action is
  65. defined  for a file type then nothing will occur.  You can change that
  66. by  configuring  a  new  file type and add a new action definition for
  67. that type.
  68. @endnode
  69. @node "Usage" "How to use Dir Menu"
  70.    @{b}I  tried  to  make  this  program  to  be  handled as easily as
  71. possible,   while   still   considered   enough   space   for   future
  72. implementations.   I  count on you to express any thoughs about future
  73. versions of Dir Menu!@{ub}
  74.    As  already  mentioned  in  @{"What is this?" link "WhatIsThis" 0} section, you can
  75. pop up the main display by pressing a hotkey.  The default  hotkey  is
  76. @{fg shine}Left Alt + d@{fg text}, however you can change this to any combination 
  77. of keys you want. You may want to take a look into @{"Tooltypes" link "ToolTypes" 0} section.
  78.    When  the  main  display  is  opened, all available volumes on your
  79. computer  will be displayed.  (you can change this to suite your needs
  80. in  the  @{"config file" link "Config" 0}) You can press on any volume
  81. name,  and  a new display with root directory will appear.  You can go
  82. 15 subdirectories deep.
  83.    The  main  display has two buttons on the top:  '@{b}Quit@{ub}' and
  84. '@{b}Close@{ub}'.   If  you  click  on  @{b}Quit@{ub}  then  Dir  Menu
  85. commodity will be removed from memory.  If you click on @{b}Close@{ub}
  86. button you will still be able to pop it up again by pressing a hotkey.
  87.    Every  display  (except  from main) has the same two buttons on the
  88. top  of  it:   '@{b}Root@{ub}' and '@{b}Parent@{ub}'.  If you click on
  89. @{b}Parent@{ub}  button  you will get rid of the highest display.  And
  90. clicking  on  @{b}Root@{ub}  button  will  take  you  down to the main
  91. display.
  92. @{fg shine}HINT:  You don't need to click on Parent button in order to
  93. go to a parent directory:  you can also click on any directory or file
  94. on  a  parent  display  (or any display), and all higher displays will
  95. automaticly  be  gone.  If you select a directory, you can close a new
  96. display by clicking on the same button again.@{fg text}
  97.    When you select a desired file Dir Menu will first try to recognize
  98. what its type is. This is done with a help of @{"whatis library" link
  99. "Whatis Library" 0} (and the
  100. FileTypes file included in this archive).If it is a file to execute it 
  101. will get executed. Otherwise it will look in @{"DirMenu.cfg config file" link "Config" 0}
  102. for that type definition. If it finds it a defined action for that
  103. type will be executed.
  104.    There  are  some  predefined  actions  already included in Dir Menu
  105. (such  as  what  to  do with Exe type file, or Guide - AmigaGuide file
  106. etc. - those definitions are listed in  @{"DirMenu.cfg file"  link "Config" 0} , and you
  107. can override them with your own new definitions).
  108.     If  you'd  like  to  configure  new  file types, please read about
  109. @{"WhatIs library" link "Whatis Library" 0} in this manual.
  110. @endnode
  111. @node "ToolTypes" "Icon Tooltypes descriptions"
  112.    Select a @{b}DirMenu@{ub} icon and select '@{b}icon information@{ub}' from
  113. a Workbench  menu.  You will be  able to  edit a  few tooltypes,  thus
  114. changing  Dir  Menu's enviroment to be the most comforting to you.
  115. @{b}Here are all tooltypes in this version:@{ub}
  116. @{fg  shine}CX_POPKEY:@{fg  text}  A  hotkey  that will popup the main
  117.    display when pressed.
  118.    @{fg fill}Examples: "lalt d", "ctrl lalt p"@{fg text}
  119.    @{b}Default: Left Alt + d (lalt d)@{ub}
  120. @{fg  shine}CX_PRIORITY:@{fg  text}  What priority this commodity will
  121.    have in the system
  122.    environment. @{b}Usually is set to 0.@{ub}
  123. @{fg  shine}CX_POPUP:@{fg  text}  Will  the main display show when you
  124.    first run Dir Menu?
  125.    Possibilities: YES, NO
  126.    If you put DirMenu in WBStartup you will set this tooltype to NO.
  127.    @{b}Default: YES@{ub}
  128. @{fg  shine}MAXITEMS:@{fg  text}  Maximum  number  of  lines  for each
  129.    display.  If you set this
  130.    to 0 the only limit for maximum height of a display will be
  131.    a screen's height.
  132.    @{fg fill}Example: 10 - only 10 lines or less will be visible.@{fg text}
  133. @{fg  shine}SLIDER:@{fg  text}  This  tooltype will let you change the
  134.    slider's width.  This is
  135.    very usefull if you use some extra strange fonts for your screen.
  136.    0 - slider width will be the same as font's width
  137.    1 - 1.5 * font's width
  138.    2 - 2 * font's width
  139.    15 or more - number of pixels. Note that the minimum width is 15
  140.    pixels.
  141.    @{b}If you define less than this, DirMenu will force to use 15 pixels.@{ub}
  142. @{fg  shine}DIRSFIRST:@{fg  text}  Will  directories appear in display
  143.    before files or after?
  144.    YES - dirs will be shown first
  145.    NO  - files will be shown before dirs
  146.    @{b}Default: YES@{ub}
  147. @{fg  shine}CLOSESELECT:@{fg  text}  Will  all displays close when you
  148.    select a file?
  149.    YES - close everything when selected (you can popup it again with a
  150.          hotkey)
  151.    NO  - remain opened when file selected
  152.    @{b}Default: YES@{ub}
  153. @{fg  shine}SHOWTYPE:@{fg  text}  This is an advanced option for those
  154.    who want to play with
  155.    configuring new types of files, and checking if they work. On each
  156.    selected file it's action, file type, and file subtype will be
  157.    written  on screen.  Read about @{"configuring new file types" link
  158. "Whatis Library" 0}.
  159.    @{b}Default: NO@{ub}
  160. @endnode
  161. @node "Config" "Configuration file description"
  162.    It is not very hard to configure new actions for file types.
  163. Firstly,  a  configuration  file  is @{fg shine}DirMenu.cfg@{fg text}.
  164. Dir Menu will first try to read it from a current directory (where Dir
  165. Menu  lies),  and it is not there Dir Menu will try to read it from s:
  166. directory.   However, if it finds the config file in a current dir, it
  167. won't  try  to  read  it  from  s:.   If there is no config file, only
  168. volumes  will  be  shown in the main display, and some default actions
  169. will  be  present.  Those default settings will be overridden if there
  170. is a config file.
  171. Currently, there are only two lists to configure:  @{fg shine}Items to appear in 
  172. the main display@{fg text}, and @{fg shine}Actions for specific file types@{fg text}.
  173. Two commands will separate those lists in  config  file:   definitions
  174. after  a line '@{u}#PATHS@{uu}'  will be  used for  configuring  the main
  175. display. And lines after a line '@{u}#ACTIONS@{uu}' will represent actions
  176. to be taken for certain file types.
  177. 1) Configuring main display@{ub}
  178. You  can configure any path of directory or file you want to appear on
  179. the  first  display.   I  use  paths  such  as Picture dirs, Text file
  180. directories  etc.   You can also define to have volumes or all assigns
  181. currently defined on your system.
  182. Main  display  configuration  starts  with  a keyword @{u}#PATHS@{uu}.
  183. Next lines should be in the following format:
  184. [@{fg  shine}"@{fg  text}]@{fg shine}name@{fg  text}[@{fg shine}"@{fg
  185. text}] [@{fg   shine}"@{fg   text}]@{fg   shine}path@{fg  text}[@{fg
  186. shine}"@{fg text}],
  187. where @{fg shine}"name"@{fg text} is a word to appear in the main display of Dir Menu,
  188. and @{fg shine}"path"@{fg text} is a full path to a file or directory you want to access.
  189. (quotes are optional,  but required if space  appears in either a name
  190. or a path).
  191. @{fg  shine}IMPORTANT:@{fg  text} You can define directories to act as
  192. files  or  dirs.   If  a path ends with a slash (/), this item will be
  193. treated  as  a  directory,  that means, if you click on it in the main
  194. display  it  will  show contents of this dir in a new display.  If you
  195. don't  add  a  slash to an end of a path Dir Menu will think this is a
  196. file  with  a  type  "Dir", and will attempt to do an action for "Dir"
  197. type (if you had defined it).
  198. @{fg fill}Examples:
  199. #PATHS ;Starts with paths definitions
  200. Pix hd0:pictures/ ;This will add a new entry with name 'Pix' in the
  201.                    main display.  This will be a directory
  202. Message "df0:filelist"   ;This is normal text file. If you select it
  203.                           Dir Menu will look for its file type, and
  204.                           make an action (if it is defined)
  205. FileDir sys:c      ;This will add a directory to the main display, but
  206.                     it won't open a new display if you select it. It
  207.                     will try to make an action on it if something is
  208.                     defined for "Dir" file type.
  209. @{fg text}
  210. @{b}2) Configuring Actions@{ub}
  211. For  each  type  of  file  Dir  Menu  can recognize you can define any
  212. program  to  get executed when a file with a certain type is selected.
  213. For example, here are a few file types Dir Menu can recognize:
  214. Exe  - Executable file;
  215. Text - ASCII text file;
  216. ILBM - IFF picture;
  217. Icon- Icon *.info file;
  218. and  many  more (you should see the original DirMenu.cfg file for more
  219. info).
  220. To   start   with  action  configuration  you  must  write  a  keyword
  221. @{u}#ACTIONS@{uu}  anywhere  in  config  file.  All entries after this
  222. should be in following format:
  223. [@{fg  shine}"@{fg text}]@{fg  shine}type@{fg  text}[@{fg shine}"@{fg
  224. text}] [@{fg shine}"@{fg text}]@{fg  shine}action@{fg text}[@{fg
  225. shine}"@{fg text}]
  226. Where  @{fg shine}"type"@{fg text} is name of a file type (or subtype: see @{" WhatIs library " link "Whatis Library" 0}
  227. for more information about types), and @{fg shine}"action"@{fg text} is name of a
  228. program (with its full path) which should execute for that file type.
  229. (quotes are again optional).
  230. When you select a file with Dir Menu, the following procedure will occur:
  231.  - Dir  Menu  tries to recognize a basic type and subtype of selected
  232.    file
  233.  - It searches through the action file list for a type definition
  234.    first, and if it doesn't find the type it will search for a subtype
  235.    definition,  and  if not found, it will look for any default action
  236.    for that type.
  237.  - it executes a proper program (action), as if it's typed from Shell:
  238.    @{fg  shine}'action  file'@{fg text} - where action is a defined file name,
  239.    and 'file' is selected file
  240. @{fg  shine}VERY IMPORTANT: File types are case SENSITIVE!@{fg text} Keep this in mind.
  241. If a program is not executed when it should be, check if you had wrote
  242. a file type correctly.
  243. @{fg  shine}TIP:@{fg  text}  If  you would like to find out about file types for a
  244. certain  files on your  computer you can do it  by changing a tooltype
  245. SHOWTYPE=TRUE,  and restart DirMenu.  For each file you select DirMenu
  246. will tell you what is its basic type,and its secondary type (SUBTYPE).
  247. @{fg shine}HINT:@{fg text} If Dir Menu does not recognize a file type it will return
  248. "Unknown".You are able to define a default action for any unrecognized
  249. file (if you make a new action entry with file type "Unknown").
  250. @{fg fill}Examples:
  251. #ACTIONS              ;starts with action definitions
  252. Exe "run >nil: <nil:" ;will run executables with a quiet input and output
  253. "Text" "ppmore"       ;will show text files with ppmore
  254. ILBM "Dpaint:Dpaint"  ;loads a picture into DPaint@{fg text}
  255. @endnode
  256. @node "Future" "About the future of Dir Menu"
  257.  I've  got  a good feeling about the future of this program.  I hope a
  258. "future  Commodore"  will want to include it into their system.  (wild
  259. dreams of every commodity writer :-) )
  260. @{fg  shine}I  really  wish that you should express any comments about
  261. this program.  @{" Click here for my address " link "Address" 0}.
  262. @{b}@{fg text}I have a few more ideas for future releases:
  263. @{ub} - exploit the unexploited right mouse button!  However I'm not
  264.  sure right  now  what would be most usefull thing to do with right m.
  265.  b.,  although  mine  works  better  than  the  left one :-(
  266.  Give me your requests on this one.
  267.  - implement the way of opening output windows (every window will
  268.  open on a front screen, not only on Workbench).
  269.  - will try to do a Workbench execute emulator - if you press on
  270.  icon file it will be as if you double clicked on that icon from
  271.  Workbench. I don't know how to do that yet. If someone knows please
  272.  send me the source!
  273. @{fg  fill}NOTE:  These ideas will only be made if a usefulness of Dir Menu
  274. is satisfactory to its users!@{fg text}
  275. @endnode
  276. @node "Thanks" "Thanks goes to ..."
  277.  Many thanks goes to an Amiga genious, and my friend @{fg shine}Andrej Presern@{fg  text}
  278. who is a real programming encyclopedia.
  279. He helped me a lot with his advice.
  280.  I  thank  authors  of WhatIs library:  @{fg shine}Sylvain Rougier@{fg
  281. text} and
  282. @{fg shine}Pierre Carrette@{fg text}.
  283.  Another one goes to @{fg shine}Ivo Kroone@{fg text} from Holland, who gave me an idea
  284. that if you  need a special program you simply write it,  and not wait
  285. it to get written by itself!  :-)
  286.  This  guide  is  written  using  @{fg  shine}Edd  Dumbill@{fg text}'s Heddley
  287. (amiga guide creator).  It's great and easy to use!
  288.  And I must not forget to thank the @{b}@{fg shine}Amiga community@{ub}@{fg text} for standing
  289. by when all those horrible things about Commodore are happening
  290. (I mean, when no things are happening) :-(
  291. @endnode
  292. @node "Address" "Author's address"
  293.  If  you have anything to say to me, @{b}PLEASE@{ub} don't hesitate to
  294. send a mail to any address written below:
  295. @{fg shine}email:@{fg text}
  296.   Jure.Vrhovnik@ijs.si
  297. @{fg shine}snail mail:@{fg text}
  298.   Jure Vrhovnik
  299.   Langusova 13
  300.   Ljubljana, 61111
  301.   Slovenia, Europe
  302. @endnode
  303. @node "Instalation" "How to install Dir Menu"
  304.    You  should  do  following  steps  in  order  to get a full working
  305. version of Dir Menu.
  306.  1) Copy @{fg shine}DirMenu@{fg text} program and this manual to any drawer you like.
  307.  2) Copy  @{fg  shine}DirMenu.cfg@{fg text} configuration file to the
  308.     same  drawer where DirMenu lies. You can also put DirMenu.cfg into
  309.     s: directory. Program will first check for this  file  in  current
  310.     directory, and will then try to load it from s:.
  311.  3) Copy @{fg shine}FileTypes@{fg text} file to your @{fg shine}s:@{fg text} directory. 
  312.     You MUST do this, otherwise Dir Menu won't recognize almost any 
  313.     types of files!
  314.  4) Copy @{fg shine}whatis.library@{fg text} to your @{fg shine}libs:@{fg text} directory.
  315. @{fg fill}That's it. Now you can run Dir Menu without any worries.@{fg text}
  316. @{b}PLEASE@{ub}  note  that  this  is a beta version.  I would like to
  317. make  this archive as user friendly as possible (what should be always
  318. present for Amiga computers).  You can expect an Installer script in a
  319. full version of Dir Menu!
  320. @endnode
  321. @node "Whatis Library" "Defining new file types"
  322.                               @{b}WhatIs.library
  323.                            Copyright S.R. & P.C.@{ub}
  324. @{fg  shine}[NOTE:   This  is an original document from WhatIs library
  325. v4.0  authors  (Sylvain Rougier and Pierre Carrette).  If you have any
  326. questions  concerning  WhatIs,  please  contact  them  on  the address
  327. written below:
  328. Sylvain Rougier 39 rue Carnot 86000 Poitiers France
  329. email: bvme@encsu1.SINet.SLB.COM  (Pierre Carrette)  ]
  330. [IMPORTANT:   In  this  section you will learn that you can create new
  331. TYPE  and SUBTYPE.  When DirMenu will search for actions, TYPE will be
  332. searched  first,  and if not found, SUBTYPE will be searched for.]@{fg
  333. text}
  334. @{fg  fill}[  Programmers  files  (sources,  includes  etc.)  are  not
  335. included  in  Dir Menu archive.  You can either get those from Aminet,
  336. me, or their authors ]@{fg text}
  337.     @{b}1.Usage
  338.     2.User's documentation
  339.     3.Programmer's documentation
  340. @{ub}
  341.     @{b}1)@{ub}
  342.     What  is whatis.library ?  It is a shared amiga library which alow
  343. programmers  to  easyly recognize type of files (ilbm, 8svx, maxiplan,
  344. exe,  PP,  etc....) BUT the final user (non-programer user) can define
  345. new  types so all programs which use whatis.library can recognize this
  346. new  type.   At  this  moment  only  BrowserII,  For  and  AddIcon use
  347. whatis.library  but  I  planned to rewrite Icon ( a program which make
  348. WorkBench 2.0 recognize files which have no icon), and I encourage all
  349. programmers to use this library so users can define new types only one
  350. time  and  every  program can use it.  I actualy work on version which
  351. support  the  datatype  of KickStart 3.0 so user of whatis.library can
  352. use both the customisable whatis type and the standard datatype type.
  353.     For example, you love graphics, you digitize lots of image with an
  354. official  commercial  program  which produce file ".img", and you want
  355. BrowserII  can  reconised  it,  well,  you  define  this  new  type in
  356. S:FileTypes  and  whatis.library know what it is, so you BrowserII can
  357. do  automatic  thing  on  your  file ".img", but all program which use
  358. whatis.library  can reconised the ".img"-type you just defined and can
  359. do what they are supposed to do with them.
  360. List of type that whatis.library reconize without any S:FileType file:
  361. DOS_DEVICE  VOLU  ME  ASSIGN  DIR  EXECUTABLE EXECPP40 EXECPP30 EXECPP
  362. SCRIPT  TEXT OBJECT LIB IFF ILBM ILBM24 ANIM 8SVX SMUS FTXT PREFS TERM
  363. ICON IMPDATA PPDATA ZOO LHARC MEDMOD
  364.     @{b}2)@{ub}  Well,  user.  All you need is to know how to define a
  365. new type.  A sample/starter FileTypes file is provided.  First, have a
  366. look  at  it  and then read what follows, I think there is not much to
  367. There are 2 methods to scan a file:  DEEP and LIGHT.  The Light one is
  368. only based on the file name and eventualy protection bits.  It is fast
  369. but unsafe.  if you rename an executable as "File.c" and you ask for a
  370. light  scan (BrowserII with "find type by name"), WhatIs.library think
  371. it is a C language source file.  The DEEP one (currently only one DEEP
  372. mode)  is  more  powerfull,  but the slowest because each file must be
  373. open  and  the  first few bytes scanned (currently 484 bytes), so this
  374. slow down directory scans.
  375. FileTypes syntax:
  376. While  not  necessary,  we  recommand use of quotes (") delimiters for
  377. strings  to  avoid  mistakes.  The # character can be found in strings
  378. while  it  is  the  comment  starting  char.   The  "#" char marks the
  379. begining of comment until end of ligne.
  380. #  example  definition:   TYPE "Src Ada" # you define a new type, it's
  381. IDString (curently 9
  382.                 # char max) is "Src Ada", this is the string that
  383.                 # WhatIs.library will return and you can see in
  384.                 # BrowserII  when you ask the "Show file type", it
  385.                 # is also the way you identify this FileType.
  386.     SUBTYPE "Text"  # OPTIONNAL: First, the file MUST be a "Text" type,
  387.                     # this means that if the file is not of this type
  388.                     # it cannot be a "Src Ada"
  389.     INSERTAFTER "Script"    # OPTIONNAL: You want the type "Src Ada" to be
  390.                             # put after the "Script" type in list. The
  391.                             # type list is not alphabetically-sorted.
  392.                             # This determine the order in which you see
  393.                             # files when you choose "Sort by file type"
  394.                             # in BrowserII
  395.     ICONNAME "def_Src Ada"  # OPTIONNAL: this the name of the default
  396.                             # icon file name. These files should be in
  397.                             # the "ENV:Sys/" directory, where WB 2.0 put
  398.                             # its default icons. This will be used by
  399.                             # AddIcon (In BrowserII and given cli command
  400.                             # This string is returned by GetIconName()
  401.     # now come the decription of the file, if ANY condition below is
  402.     # not satisfied, the WhatIs.library think it is not this filetype.
  403.     # Exepte for OPNAMEPATTERN which is used for light WhatIs() (only
  404.     # based on the file name)
  405.     NAMEPATTERN "#?.ada"    # OPTIONNAL: if given, the filename must match
  406.                             # this pattern.
  407.                             # it is mutualy exclusive with OPTNAMEPATTERN
  408.     OPTNAMEPATTERN "#?.ada" # OPTIONNAL: same as NAMEPATTERN but it is
  409.                             # a DEEP scan may override it.
  410.                             # it is mutualy exclusive with NAMEPATTERN
  411.     # NAMEPATTERN vs OPTNAMEPATTERN
  412.     # Imagine you are used to name all your image files with .ilbm
  413.     # extension. This way, a LIGHT scan will identify your ilbm files
  414.     # if your specify NAMEPATTERN "#?.ilbm". But ILBM files can also be
  415.     # internally recognized (using DEEP scan). If you specify
  416.     # NAMEPATTERN "#?.ilbm", all ILBM files not ending with .ilbm will
  417.     # not be recognized by whatis.library. But if you specify
  418.     # OPTNAMEPATTERN "#?.ilbm", the DEEP scan will override the (OPT)
  419.     # name pattern, and all ILBM files will be recognized.
  420.     # Now come the DEEP description. It is the heart of recognition
  421.     # process.  You can specify numbers in decimal (begining with a
  422.     # digit), in hex (begining with $), in binary (begining with "%").
  423.     # Strings begin with a letter or with a quote '"'
  424.     # The search is done within the first (currently 484) few bytes of
  425.     # the file.
  426.     # All these conditions are optional, and are considered as TRUE
  427.     # by LIGHT scan.
  428.     COMPAREBYTE 12 $ABADCAFE    # Test if the file contains the bytes
  429.                                 # $AB $AD $CA $FE at offset 12
  430.     COMPAREBYTE $23 "Hello"     # Test if the file contains the string
  431.                                 # "Hello" (i.e the bytes $48 $65 $6c $6f)
  432.                                 # at offset $23 (decimal 35)
  433.     # in version 2 of WhatIs.library (only under KS2.x) you have an
  434.     # optionnal CASE modifier, this means "A" is different of "a".
  435.     SEARCHBYTE "Good"   # Search for "Good" in the first bytes of file.
  436.     SEARCHBYTE $DEADBEEF    # Search for bytes $DE $AD $BE $EF
  437.     SEARCHPATTERN [CASE] "ST-??:"   # Search for "ST-??:" pattern in file.
  438.     MATCHPATTERN [CASE] 12 "ST-??:" # Search for "ST-??:" pattern in file
  439.                                     # at offset 12.
  440. ENDTYPE     # this marks the end of this FileType definition.
  441.     AskReparse  is  a small executable which ask whatis.library to reparse the S:FileTypes file. The file will be effectively parsed only if whatis.library is not used except by AskReparse at call time. Else, the parse is defered until whatis.library has no user.
  442.     @{b}3)@{ub}
  443.     Look in the WhatIsBase.h, you will find all you want.
  444.     How works WhatIs() ?
  445.     WhatIs is currently based on 2 methods:  light or deep.  The light
  446. one  is  only  based  on the information you pass to it.  In deep mode
  447. WhatIs()  open  the file and scans the first few bytes (currently 488:
  448. the size of an OldFileSystem data-block), so after loading these bytes
  449. in  memory,  WhatIs()  examine  them  to  discover  what  type  it is.
  450. WhatIs() also examine the FileInfoBlock.
  451.     WhatIs()  return  a  PRIVATE  ULONG.   You  should  not  make  any
  452. assumption  about  how  it is coded, because it may and WILL change in
  453. future.  You keep this ULONG and give it to the different functions of
  454. whatis.library.   All  FileTypes  must  be  first  referenced by their
  455. IDString "ILBM", "Text", "Exe, etc..., or returned by WhatIs().
  456. For  example you want to check if the file "Amiga" is an ILBM picture,
  457. you should write:
  458.     ULONG Type, ILBMType;
  459.     Type = WhatIsTags("Amiga", WI_Deep, DEEPTYPE, TAG_DONE);
  460.     ILBMType = GedIdType("ILBM");
  461.     if (CmpFileType( Type, ILBMType) == 0)
  462.     {
  463.         /* Yes it is ILBM ! */
  464.         your code here
  465.     }
  466.     else
  467.     {
  468.         /* Not an ILBM */
  469.         your code here
  470.     }
  471. Currently supported tags by WhatIs():
  472.     WI_FIB      /* TagItem.ti_data = struct FileInfoBlock *FIB, default = NULL */
  473.     WI_Deep     /* TagItem.ti_data = LIGHTTYPE or DEEPTYPE. default = LIGHTTYPE */
  474.     WI_Buffer   /* TagItem.ti_data = Buffer ptr WARNING: your buffer MUST be NUL terminated */
  475.     WI_BufLen   /* TagItem.ti_data = Buffer Len */
  476.     WI_DLX      /* TagItem.ti_data = DLX_numble, found in ArpBase.h */
  477.     /* Version 2.1 or higher */
  478.     WI_DLT      /* TagItem.ti_data = DLT_numble, found in DOS 2.0 */
  479. Version history:
  480.     1.0:    Version for KickStart 1.3.  Only This Version support 1.3.
  481.             All others need KS2.0
  482.     1.1:    Fixed a little bug.
  483.     ALL next versions NEED KS2.0
  484.     2.0:    First Version of whatis.library.
  485.             (the 1.0 was a limited version made for 1.3)
  486.     3.0:    Fixed a little bug.
  487.             GetParentFileType() Added
  488.             IsSubTypeOf() Added
  489.             DLT support (KS2.0 version of the ARP DLX)
  490.     3.4:    25/12/92
  491.             Fixed a Little Bug: the UNKNOWNFILETYPE was not returned by NextType()
  492.     3.5:    4/1/93
  493.             Fixed a BIG bug born when fixed the preceding bug:
  494.             Forgot subtype of root in FirstType()/NextType().
  495.         3.6:            25/07/93 (Internal)
  496.                                 Internal: Incorect scan of TagItems. Fix ed.
  497.                                 SEARCHPATTERN don't work it string was not ent  iled by "#?". Fixed
  498.         3.7:            12/08/93
  499.                                 Fixed an Enforcer hit in NextType()
  500.                                 Minor change: change the VERSTRING proto col.
  501. @endnode
  502.